######

READ ME

This folder contains replication material for York, Erin. "Preferences over Foreign Migration: Testing Existing Explanations in the Gulf" (World Politics, 2022). 

Please cite the published article when utilizing these files.


## Additional data access

# Survey Data
Please note that some of the data used in analysis are from a restricted access survey collected by the Social and Economic Survey Research Institute (SESRI) at Qatar University and must be individually requested. The name of the survey in question is "Qatari Attitudes Towards Foreign Workers" (collected in 2012). 

To access these data, submit a Data Request Form to SESRI using the survey name and date. The contact information for the institute is found at url https://sesri.qu.edu.qa/research/sesri/contact-us. The data request form is found at url: https://sesri.qu.edu.qa/static_file/qu/research/SESRI/documents/SESRI%20Data%20Request%20Form%20v2.pdf). URLs current as of February 2, 2022.

For an example of a completed data request form and resulting data usage agreement, see Section A9 of the supplementary materials associated with this publication.

# WVS Data
The analysis also incorporates merged data from wave 7 of the World Values Survey (2017-2021), a cross-national survey on individual attitudes and values. These data are available without restrictions from https://www.worldvaluessurvey.org/WVSDocumentationWV7.jsp. URL current as of February 2, 2022.

To access the relevant data file (WVS_Cross-National_Wave_7_R_v2_0.rdata), go to the preceding URL, select "WVS Cross-National Wave 7 R v2 0.zip (rdata)", fill out the required information form and click "Download". See https://www.worldvaluessurvey.org/WVSDocumentationWV7.jsp for additional versions of the dataset as well as a full codebook and other supporting documentation.


## Description of files


# Code files

02_replicationcode_wvs.R : R file containing all code required to generate Figure A3 and Table A10 in the Supplementary Material. File sources un_migrantpop.csv and WVS_Cross-National_Wave_7_R_v2_0.rdata, merges them, and generates relevant analyses. To run this file, download WVS_Cross-National_Wave_7_R_v2_0.rdata following the "WVS data" instructions above and un_migrantpop.csv (available via this replication package). Then set your working directory as appropriate and run the code.

03_replicationcode_qatar.R : R file containing all code required to generate Figures and Tables in the main text and remaining Figures and Tables in the Supplementary Material. File sources "Qatari’s Attitudes Towards Foreign Workers 2012.dta", cleans and reformats data as necessary, and generates all relevant analyses. To run this file, request access to "Qatari Attitudes Towards Foreign Workers" survey data from SESRI (following the "Survey Data" instructions above), set your working directory as appropriate, and run the code.

# Data files

un_migrantpop.csv : This is a csv file containing data (at the country/territory level) on international migrant stock provided by the UN Population Division. Data were acquired from https://www.un.org/en/development/desa/population/migration/data/estimates2/estimates19.asp and cleaned to remove regions and additional variables not used in analysis. Variables include a country code indicator (Code), country name (country_name), and estimates of migrant stock as a percent of total population in 2015 and 2019 (migrant_2015 and migrant_2019).


## Description of analysis

The analysis was conducted using R version 4.1.1 (2021-08-10).